home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 19 / CU Amiga Magazine's Super CD-ROM 19 (1998)(EMAP Images)(GB)[!][issue 1998-02].iso / CUCD / Programming / LEDA / INSTALL < prev    next >
Text File  |  1994-08-05  |  5KB  |  152 lines

  1. *******************************************************************************
  2. *                                                                             *
  3. *                              LEDA 3.1b                                       *
  4. *                                                                             *
  5. *                            INSTALLATION                                     *
  6. *                                                                             *
  7. *******************************************************************************
  8.  
  9.  
  10. In this file I use <LEDA> to denote the path name of the LEDA main 
  11. directory. It should contain the following files and subdirectories: 
  12.  
  13. README                    informations about LEDA
  14. INSTALL                   this file
  15. Changes                   most recent changes (Please read it!)
  16. Makefile                  make script
  17. incl/                     LEDA include directory
  18. src/                      LEDA source files
  19. prog/                     example programs
  20. web/                      cweb sources
  21. man/                      user manual (TeX)
  22.  
  23.  
  24. LEDA can be used with almost any AT&T and GNU C++ compiler. It is developed 
  25. and testet with cfront-2.0, cfront-2.1, cfront-3.0.1, g++-1.37, g++-1.40, 
  26. g++-2.2, and g++-2.3
  27.  
  28.  
  29. Currently, the template version (LEDA-3.0) can be used with cfront 3.0.1 
  30. and g++-2.3. Note however that there are still many bugs in the template 
  31. implementation of g++-2.3 (see Problems/gnu-2.3). In particular, there are 
  32. problems with function templates still making the use of the 
  33. "LEDA_TYPE_PARAMETER" macro necessary for non-simple type parameters.
  34. See the "Changes" file for more information.
  35.  
  36. For compilers not supporting templates there is a non-template variant "LEDA-N"
  37. available whose parameterized data types are based on declare-macros as in
  38. previous LEDA versions.
  39.  
  40.  
  41. 1. COMPILING
  42. -------------
  43.  
  44.    You have to make the following libraries (cf. user manual section 1.9) :
  45.  
  46.    libL.a             main  library
  47.    libG.a             graph library
  48.    libP.a             plane library
  49.    libWx.a            X11 window library  (optional)
  50.  
  51.  
  52.    a)  go to the LEDA main directory
  53.        cd <LEDA>
  54.  
  55.    b)  Create a symbolic link "c++" to your C++ compiler
  56.           ln -s /usr/local/bin/g++  c++  
  57.        or ln -s /bin/CC  c++
  58.  
  59.        If using g++ (version > 2) you also have to make a link "gcc" to the 
  60.        GNU C compiler: 
  61.           ln -s /usr/local/bin/gcc gcc
  62.  
  63.    c)  Type "make".
  64.  
  65.  
  66.  
  67.  
  68. 2. INSTALLATION 
  69. ----------------
  70.  
  71. a) Header Files
  72.   
  73.    All LEDA header files are contained in "<LEDA>/incl/LEDA".
  74.    You have to copy this directory to the C++ default include 
  75.    directory, e.g., 
  76.  
  77.    AT&T CC:  cp -r <LEDA>/incl/LEDA /usr/include/CC
  78.  
  79.    GNU g++:  cp -r <LEDA>/incl/LEDA /usr/local/lib/g++-include     
  80.  
  81.  
  82.  
  83. b) Libraries
  84.  
  85.    Copy the libraries to /usr/lib  or /usr/local/lib 
  86.    and run ranlib, e.g.,  
  87.  
  88.    AT&T CC: cp <LEDA>/lib*.a /usr/lib
  89.             ranlib /usr/lib/lib[L,G,P,W]*.a
  90.  
  91.    GNU g++: cp <LEDA>/lib*.a /usr/local/lib
  92.             ranlib /usr/local/lib/lib[L,G,P,W]*.a
  93.  
  94.  
  95.  
  96.    Then the -l option  can be used to compile and link programs
  97.    (see section 1.9 of the user manual):
  98.  
  99.    CC (g++)  prog.c -lL
  100.    CC (g++)  prog.c -lG -lL          (for programs using graph data types)
  101.    CC (g++)  prog.c -lP -lG -lL -lm  (for programs using geometric data types)
  102.  
  103.    for programs using windows:
  104.    CC (g++)  prog.c -lP -lG -lL -lWx -lX11 -lm
  105.  
  106.  
  107.  
  108. REMARK:
  109.  
  110.    If you cannot write "/usr/(local/)include" and "/usr/(local/)lib"
  111.    on your system, you have to use the -I and -L compiler flags to 
  112.    compile LEDA programs:
  113.  
  114.    CC (g++) -I<LEDA>/incl -L<LEDA>  ...
  115.  
  116.  
  117.  
  118.  
  119. 3. EXAMPLE PROGRAMS
  120. -------------------
  121.  
  122.    Example programs can be found on  <LEDA>/prog, to compile them 
  123.    you have to use the following libraries:
  124.  
  125.    <LEDA>/prog/basic:    -lL
  126.    <LEDA>/prog/graph:    -lG -lL
  127.    <LEDA>/prog/plane:    -lP -lG -lL -lm
  128.    <LEDA>/prog/graphics: -lP -lG -lL -lWx -lX11 -lm 
  129.  
  130.  
  131. 4. GRAPH ALGORITHMS
  132. -------------------
  133.  
  134.    The source code for all graph algorithms (included in libG.a) can be 
  135.    found on <LEDA>/src/graph_alg
  136.  
  137.  
  138.  
  139. 5. USER MANUAL
  140. --------------
  141.  
  142.    <LEDA>/man contains the TeX sources for the LEDA user manual.
  143.    To make MANUAL.dvi call "tex MANUAL" in this directory, probably you
  144.    have to change the values of "\hoffset" and "\voffset" in "MANUAL.mac". 
  145.    The man directory also contains a simple interactive manual reader:
  146.    csh-script "Lman". To use it you must have installed "gawk" or a 
  147.    compatible awk version, in the "Lman" script you have to set variable 
  148.    "awk_cmd" to the name of your awk command and variable "man_dir" to 
  149.    the name of the LEDA man directory on your machine.
  150.  
  151.  
  152.